package com.bibrApp.difu.fragment.bucang_record_mvp;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bibrApp.difu.R;
import com.bibrApp.difu.utils.Tools;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

public class BucangRecordAdapter extends BaseQuickAdapter<BucangRecordBean, BaseViewHolder> {
    public BucangRecordAdapter() {
        super(R.layout.item_bucang, new ArrayList<>());
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, BucangRecordBean item) {

        helper.setText(R.id.item_orderid, item.getOrderNo());
        helper.setText(R.id.item_time, Tools.getTime(item.getCreateTime()));
        helper.setText(R.id.item_type, item.getCoinEunit());


        DecimalFormat decimalFormat = new DecimalFormat("0.00000000");

        helper.setText(R.id.item_money, decimalFormat.format(item.getTransactionNum()));
    }
}
